From: Daniel Carl <danielcarl@gmx.de>
Date: Sat, 28 Apr 2018 22:03:59 +0000 (+0200)
Subject: Clear search on stopping incsearch.
X-Git-Url: https://git.owens.tech/assets/lich_lifts_title_slice.png%20%22Lich%20Lifts%22/assets/lich_lifts_title_slice.png%20%22Lich%20Lifts%22/git?a=commitdiff_plain;h=f20cbce4a5cb94c0dadeb386eea49599c9823839;p=vimb.git

Clear search on stopping incsearch.

The search highlight was not removed if incsearch was enabled and the
search not commited by <CR> but left by <Esc>.
---

diff --git a/src/ex.c b/src/ex.c
index 98da593..a8acc7b 100644
--- a/src/ex.c
+++ b/src/ex.c
@@ -242,6 +242,9 @@ void ex_leave(Client *c)
 {
     completion_clean(c);
     hints_clear(c);
+    if (c->config.incsearch) {
+        command_search(c, &((Arg){0, NULL}), FALSE);
+    }
 }
 
 /**